#pragma once

class Info{	
private:
	int distance; //metros
	int time; //minutos

public:
	Info();
	Info(int dist, int time);
	Info(const Info& info);

	void setDistance(int d);
	int getDistance() const;
	void setTime(int t);
	int getTime() const;

	Info& operator = (const Info& w);
	bool operator>(Info& info) const;
	bool operator ==(int num) const;
	bool operator !=(int num) const;
	void write(ostream& out) const;
};

Info::Info(){
	this->distance = 0;
	this->time = 0;
}

Info::Info(int dist, int time){
	this->distance = dist;
	this->time = time;
}

Info::Info(const Info& info){
	this->distance = info.distance;
	this->time = info.time;
}


void Info::setDistance(int d){
	this->distance = d;
}

int Info::getDistance() const{	
	return distance;
}

void Info::setTime(int t){
	this->time = t;
}

int Info::getTime() const{	
	return time;
}

Info& Info::operator = (const Info& w) {
	this->distance = w.getDistance();
	this->time = w.getTime();
	return *this ;
}

bool Info :: operator ==(int num) const
{
	return(
		this->distance == 0
		&& this->time == 0
		);
}

bool Info :: operator !=(int num) const
{
	return !(*this == num);
}

bool Info::operator>(Info& info) const{	
	return (distance > info.distance);
}

void Info::write(ostream& out) const{	
	out << "Distance: " << distance << " Time: " << time << endl;
}

ostream& operator << (ostream& out, Info& f) {
	f.write(out);
	return out;
}
